import request from '@/utils/request';

// 查询品牌
export const listBrandByCate = (categoryId) => {
    return request({
        url: `/product/brandCategoryRelation/brand/${categoryId}`,
        method: 'get'
    })
}
// 添加关联
export const addBrand2Category = (brandId, catelogId) => {
    return request({
        url: `/product/brandCategoryRelation/${brandId}/${catelogId}`,
        method: 'post'
    })
}

// 查询关联列表
export const listBrand2Category = (params) => {
    return request({
        url: '/product/brandCategoryRelation/list',
        method: 'get',
        params
    })
}

// 删除关联
export const delBrand2Category = (id) => {
    return request({
        url: `/product/brandCategoryRelation/${id}`,
        method: 'delete'
    })
}
